<?php
include("../config/connect.php");
include("../public/common.php");

$tbid = CheckUrlParamNoDie("tbid");
$callback = CheckUrlParamNoDie("callback");

if( $tbid == "" )
{
	echo "$callback({\"id\":0});";
}
else
{
	$sql = "select id,tb_id,phone,email from user where tb_id='$tbid' limit 1";
	$result = mysql_query( $sql );
	if (mysql_num_rows( $result ) > 0)
//	if ($result)
	{
		$row = mysql_fetch_assoc( $result );
//		echo "id=".$row["id"]."&phone=".$row["phone"]."&email=".$row["email"];
		echo "$callback({\"id\":".$row["id"].",\"phone\":\"".$row["phone"]."\",\"email\":\"".$row["email"]."\"});";
	}
	else
	{
		echo "$callback({\"id\":0});";
	}
}

?>